package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.trade.service.invest.InvestDubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by lixiang on 2017/11/22.
 */
@Component
public class InvestingProjectDeleteJobTrigger {
	private static final Logger logger = LoggerFactory.getLogger(InvestingProjectDeleteJobTrigger.class);

	@Reference(version = "1.0.0")
	private InvestDubboService investDubboService;

	@Scheduled(cron = "${invest.project-delete-job-trigger}")
	public void deleteSoldOutProject() {
		logger.info("已售罄标的删除job");
		investDubboService.deleteSoldOutProject();
	}

}
